{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[92, 99, 98, 82, 83, 90, 100, 99]\n"
     ]
    }
   ],
   "source": [
    "names = [\"A\",\"B\",\"C\",\"D\"]\n",
    "# 4.删除列表\n",
    "# names.clear()\n",
    "# print(names)\n",
    "\n",
    "#index 索引的值 value 值\n",
    "stu_grades = [92,93,98,82,83,90,100,93,]\n",
    "## 3.2 pop 删除 pop（）不填内容 对应记忆==》append（）删除末位\n",
    "#目标：使用pop（）删除成绩为93的所有值\n",
    "# 本质： list的本身有index&value\n",
    "pop_index_list = []\n",
    "for index,value in enumerate(stu_grades):\n",
    "    # enumerate  枚举\n",
    "    # print(index,value)\n",
    "    if value == 93:\n",
    "        # stu_grades.pop(index)\n",
    "        stu_grades[index] += 6\n",
    "        # 在93这个值的基础上＋1\n",
    "print(stu_grades)\n",
    "        # print(index,value)\n",
    "#"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
